Previous:
Twig template - notes
, Up:
Index
Ion command lines
Key
# create key for app
php
bin
/
ion
make
:
key
# create jwt key
php
bin
/
ion
make
:
key
--
jwt
Model
# create new model in database/model folder
php
bin
/
ion
make
:
model
`
name
`
Provider
#create new provider on database/provider folder
php
bin
/
ion
make
:
provider
`
name
`
# create new provider add call method in api file
# must api file in version folder called Api.php
php
bin
/
ion
make
:
provider
`
name
`
--
api
=
`
version_folder
`
Seeder
# create new seeder in database/seeder folder
php
bin
/
ion
make
:
seeder
`
name
`
Super panel
# install super admin panel with design in folder super
php
bin
/
ion
install
:
super
Schema dump
# create sql dump file in database/migration folder
php
bin
/
ion
schema
:
dump
# add database to command to choose connection name
--
database
=
`
name
`
# add path where you want to save dump file must full path
--
path
=
`
path
/
to
/
folder
`
# add prune to delete all schema files after create dump file
--
prune
Migration run
# create migration system called to run all schema class run up or dowm
# default is up
php
bin
/
ion
migrate
# add database to command to choose connection name
--
database
=
`
name
`
# add install to create migration table in database if it not found
--in
stall
# add refresh to run down command in schema classes
--
refresh
Rollback
# rollback for database dump file from migration table
php
bin
/
ion
migrate
:
rollback
# add database to command to choose connection name
--
database
=
`
name
`
# add step to run back more than one step
--
step
=
`
number
`
Schema class
# create schema file in database/schema folder
php
bin
/
ion
make
:
schema
`
name
`
Controller
# create controller in any folder in app
# default web/controller
# default create html file in twig tempale
php
bin
/
ion
make
:
control
`
name
`
# add path to choose where to create
--
path
=
`
folder
`
# add sub to choose what sub folder in controller wat to add to
# default in controller folder
--
sub
=
`
folder
`
# add smarty to add as smarty template
--
smarty